local timestamp = ngx.time()
local seq = ngx.var.except_seq
local token = ngx.md5(ngx.var.timestamp..seq)

if tonumber(ngx.var.timestamp) + 10 < timestamp then
    ngx.log(ngx.ERR, "token expire")
    ngx.exit(403)
end
if ngx.var.token ~= token then
     ngx.log(ngx.ERR, "token ["..ngx.var.token.."] is invalid")
     ngx.exit(403)
end
